﻿using FreeSql.DataAnnotations;
using ImTools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoneLinePacking.Enums;
using ZoneLinePacking.Models.Entity.Base;

namespace ZoneLinePacking.Models.Entity.BaseInfo {

    [Table(Name = "base_product")]
    public class ProductEntity : EntityBase {

        private string _productName = string.Empty;
        private string _description = string.Empty;
        private string _model = string.Empty;
        private WorkDirectionEnum _workDirection = WorkDirectionEnum.None;
        private string _materialNumber = string.Empty;
        private string _unit = string.Empty;
        private string _memo = string.Empty;
        private long _customerID;
        private string _validationRules = string.Empty;

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName {
            get => _productName;
            set => SetProperty(ref _productName, value);
        }

        /// <summary>
        /// 产品描述
        /// </summary>
        public string Description {
            get => _description;
            set => SetProperty(ref _description, value);
        }
    
        /// <summary>
        /// 产品型号
        /// </summary>
        public string Model {
            get => _model;
            set => SetProperty(ref _model, value);
        }

        /// <summary>
        /// 方向
        /// </summary>
        public WorkDirectionEnum WorkDirection {
            get { return _workDirection; }
            set => SetProperty(ref _workDirection, value);
        }

        /// <summary>
        /// 备注
        /// </summary>
        public string Memo {
            get => _memo;
            set => SetProperty(ref _memo, value);
        }

        /// <summary>
        /// 客户ID
        /// </summary>
        public long CustomerID {
            get { return _customerID; }
            set => SetProperty(ref _customerID, value);
        }
       
        /// <summary>
        /// 物料编号
        /// </summary>
        public string MaterialNumber {
            get { return _materialNumber; }
            set => SetProperty(ref _materialNumber, value);
        }
       
        /// <summary>
        /// 物料单位
        /// </summary>
        public string Unit {
            get { return _unit; }
            set => SetProperty(ref _unit, value);
        }

        /// <summary>
        /// 产品码验证规则
        /// </summary>
        public string ValidationRules {
            get { return _validationRules; }
            set => SetProperty(ref _validationRules, value);
        }

    }
}
